﻿import java.util.*;
public class Er014 {
/*
 * 	问题：顾客的四位会员卡号的各位数字之和。
 */
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		System.out.println("请输入四位会员号：");
		int cusNo = input.nextInt();
		int geWei = cusNo%10;
		int shiWei = cusNo%100/10;
		int baiWei = cusNo%1000/100;
		int qianWei = cusNo/1000;
		int sum = geWei+shiWei+baiWei+qianWei;
		System.out.println("会员卡号"+cusNo+"各位之和："+sum);
		boolean isLuck = sum > 20;
		System.out.println("是幸运用户吗？" + isLuck);

	}

}
